package ee.kuli.hk.rent;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ListView;
import android.widget.TextView;

public class DevicesInStorage extends Activity {
	private ListView devices_list;
	private TextView empty_list;
	
	 public void onCreate(Bundle savedInstanceState) {
	    super.onCreate(savedInstanceState);
		setContentView(R.layout.main);
		empty_list = (TextView) findViewById(R.id.list_empty);;
		drawUI();
	 }
	 
	 @Override
	protected void onResume() {
		super.onResume();
		drawUI();
	}

	public void drawUI() {
		devices_list = (ListView) findViewById(android.R.id.list);
		devices_list.setEmptyView(empty_list);
		devices_list.setAdapter(new DeviceListAdapter(this, MainActivity.getDevicesList(MainActivity.LIST_DEVICES_IN)));
	 }
	
}
